Skip to content

TabPFN interface for on-prem - #342

Merged
safaricd merged 6 commits into
mainfrom
ENG-871
Jul 21, 2026
Merged

TabPFN interface for on-prem#342
safaricd merged 6 commits into
mainfrom
ENG-871

Conversation

@safaricd

Copy link
Copy Markdown
Contributor

Change Description

ImplementTabPFNClassifier and TabPFNRegressor interfaces for self-hosted TabPFN.

@safaricd
safaricd requested a review from a team as a code owner July 18, 2026 19:28
@safaricd
safaricd requested a review from simo-prior July 18, 2026 19:28

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces scikit-learn estimators (TabPFNClassifier and TabPFNRegressor) backed by a self-hosted TabPFN inference container over HTTP. The feedback suggests several improvements: implementing deepcopy to prevent crashes when using scikit-learn utilities like GridSearchCV due to the uncopyable httpx.Client, optimizing _to_jsonable to avoid redundant conversions when the input is already a list, adding defensive checks in fit to validate non-empty inputs and detect NaN values, and improving HTTP error handling to extract and raise detailed server error messages.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/tabpfn_client/hosted/estimator.py
Comment thread src/tabpfn_client/hosted/estimator.py
Comment thread src/tabpfn_client/endpoints/estimator.py Outdated
Comment thread src/tabpfn_client/hosted/estimator.py
Comment thread src/tabpfn_client/hosted/estimator.py
Comment thread src/tabpfn_client/hosted/estimator.py
@safaricd safaricd changed the title Include options for KV cache and model_path TabPFN interface for on-prem Jul 18, 2026
Comment thread src/tabpfn_client/hosted/estimator.py
Comment thread src/tabpfn_client/endpoints/estimator.py Outdated

@ggprior ggprior left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we'd have the opportunity to cleanly implement sklearn interfaces, as in server, which makes sense now given kv cache semantics--- fit returns model_id, predict predicts.
Is there a reason to stick with single endpoint here? This was more a workaround for the market places?

otherwise LGTM

Comment thread src/tabpfn_client/endpoints/__init__.py Outdated
Comment thread src/tabpfn_client/hosted/estimator.py
Comment thread src/tabpfn_client/hosted/estimator.py
Comment thread src/tabpfn_client/endpoints/estimator.py Outdated

@simo-prior simo-prior left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two points:

  1. model_id in the predict() signature is problematic, it invalidates the reason we (painfully) try to adhere to the sklearn estimator's interface.
  2. I'm not sure I buy this should be a separate interface entirely from standard estimators. I think we should rather have a common base class.

Deferring to you on both points, but I think 1) is important.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b261ff5. Configure here.

Comment thread src/tabpfn_client/hosted/estimator.py
@safaricd
safaricd added this pull request to the merge queue Jul 21, 2026
Merged via the queue into main with commit ff5bcdf Jul 21, 2026
10 checks passed
@safaricd
safaricd deleted the ENG-871 branch July 21, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants